function loginAuth(OriginComponent) {
  return props => {
    // 判断是否登录
    const token = localStorage.getItem("token")

    if (token) {
      return <OriginComponent {...props} />
    } else {
      return <div>请先登录</div>
    }
  }
}

export default loginAuth